<?php
App::uses('AppController', 'Controller');

class InteressadosViajarController extends AppController {
	
	var $layout = 'hotsite_viajar';

	public function index() {
		$this->InteressadosViajar->recursive = 0;
		$this->set('interessadosViajars', $this->paginate());
	}


	public function add() {
		if ($this->request->is('post')) {
			$this->InteressadosViajar->create();
			if ($this->InteressadosViajar->save($this->request->data)) {
				$this->Session->setFlash('The interessados viajar has been saved');
				$this->redirect(array('action' => 'index'));
			} else {
				$this->Session->setFlash('The interessados viajar could not be saved. Please, try again.');
			}
		}
		$paises = $this->InteressadosViajar->Pais->find('list', array('fields'=>array('id_paises', 'iso3'), 'order'=>'iso3 ASC'));
		$this->set(compact('paises'));
	}

}
